<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport"
          content="width=device-width, initial-scale=1">
    <title>开始答题</title>
    <!--<title>问题联系：ysq8888520</title>-->
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">

    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <link rel="icon" type="image/png" href="assets/i/favicon.png">

    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="assets/i/app-icon72x72@2x.png">

    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">

    <!-- Tile icon for Win8 (144x144 + tile color) -->
    <meta name="msapplication-TileImage" content="assets/i/app-icon72x72@2x.png">
    <meta name="msapplication-TileColor" content="#0e90d2">


    <link rel="stylesheet" href="../assets/css/amazeui.min.css">
    <link rel="stylesheet" href="../assets/js/layui/css/layui.css">
    <link rel="stylesheet" href="../assets/css/global.css">

    <!--弹出层公共样式-->
    <link rel="stylesheet" href="../assets/css/popup.css">
    <link rel="stylesheet" href="../assets/css/start_answer.css">

</head>
<body>
<div class="app-bg"></div>

<div id="index_div">
    <div class="app-main">

        <!--答题者信息-->
        <div class="start-answer-head-wrap">
            <div class="start-answer-head-info">
                <img :src="user_info.avatar" width="60" alt="">
                <div class="start-answer-head-info-detail" v-cloak>
                    <span class="name">{{user_info.nickname}}</span>
                    <span class="id">ID:{{user_info.id}}</span>
                </div>
                <div class="start-answer-time">
                    <span class="end-time" style="display: none">9</span>
                </div>
            </div>

            <div class="layui-clear"></div>

            <!--进度条-->
            <div class="progress-bar-box margintop15">
                <div class="progress-bottom">
                </div>
                <div class="progress">
                </div>
            </div>
            <!--进度条End-->

        </div>
        <!--答题者信息End-->

        <!--题目详情-->
        <div class="start-answer-content-wrap margintop15">

            <!--题数-->
            <div class="show-answer-num-box am-text-center" style="display: none">
                <span>第1题</span>
            </div>
            <!--题数End-->

            <!--题目展示详情-->
            <div class="start-answer-detail-box" style="display: none">
                <span class="start-answer-detail-num">第1题</span>
                <span class="start-answer-detail-content margintop15">{{problem_title}}</span>

                <!--答案列表-->
                <div class="answer-detail-keys-box" style="display: none" v-cloak>
                    <!--正确：correct 错误：error 点击：click-->
                    <!--<div class="key-item" v-for="(option,index) in problem_option_list" :data-id="option.id" >-->
                        <!--<span class="symbol">{{index | getChar}}</span>-->
                        <!--<span>{{option.content}}{{option.id}}</span>-->
                    <!--</div>-->

                </div>
                <!--答案列表End-->
            </div>
            <!--题目展示详情End-->
        </div>
        <!--题目详情End-->

    </div>


    <!--挑战成功-->
    <div class="pop-up-box" id="answer_correct_pop_up">
        <div class="shade-box" style="display: none">
            <img src="../images/shade_xy.png" alt="" width="66%">
        </div>
        <div class="answer-correct-box">

            <div class="withdrawal-content-box am-text-center">
                <img src="../images/popUp/answer_correct.png" width="100%" alt="">
                <span class="pop-up-answer-correct-title margintop15">恭喜挑战成功</span>
                <span class="pop-up-answer-correct-title">获得好友{{challenge_info.money}}元奖励</span>
                <div class="pop-up-answer-correct-box">
                    <img src="../images/qrcode.jpg" width="56" alt="">
                    <div class="correct-ercode-title am-text-left">
                        <span>长按识别二维码关注公众号<br>即可收到挑战的实时通知</span>
                    </div>
                </div>

                <div class="pop-up-answer-correct-op-box ">
                    <div class="pop-up-correct-btn1" onclick="window.location.href='challenge.html'">发起挑战</div>
                    <div class="pop-up-correct-btn2" id="onMenuShareAppMessage" :data-value="challenge_info.money">炫耀一下</div>
                </div>
            </div>
        </div>
        <div class="pop-up-bottom am-text-center">
            <!--<div>长按图片，保存到相册后分享给好友或朋友圈</div>-->
        </div>
    </div>


    <!--挑战成功-->
    <div class="pop-up-box" id="answer_error_pop_up">
        <div class="answer-error-box">

            <div class="withdrawal-content-box am-text-center">
                <img src="../images/popUp/answer_error.png" width="143" alt="">
                <span class="pop-up-answer-error-title margintop25">哎呀~ 差一点就挑战成功了</span>
                <span class="pop-up-share margintop25">前往分享获取挑战卡再次挑战</span>

                <div class="pop-up-answer-error-op-box margintop15 am-text-center">
                    <div class="pop-up-error-btn3" onclick="window.location.href='user.html?is_show=1'">领取挑战卡</div>
                    <div class="pop-up-error-btn4" onclick="window.location.href='index.html'">返回大厅</div>
                    <div class="pop-up-error-btn5" onclick="window.location.href='answer.html?id='+getQueryString('challenge_id')">再试一次</div>
                </div>
            </div>
        </div>

    </div>

</div>


<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="../assets/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="../assets/js/amazeui.min.js"></script>
<script src="../assets/js/layui/layui.js"></script>
<script src="../assets/js/global.js"></script>

<script src="../assets/js/vue.js"></script>

<!--页面内js-->
<script src="../assets/js/frontend/start_answer.js"></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>

    function startJsSDK(){
        /**
         * 配置JS-SDK
         */
        wx.config({
            "debug": false,
            "beta": false,
            'appId': js_config.appId,
            'timestamp': js_config.timestamp,
            'nonceStr': js_config.noncestr,
            'signature': js_config.signature,
            "jsApiList": ["onMenuShareAppMessage","onMenuShareTimeline"]
        });

        document.querySelector('#onMenuShareAppMessage').onclick = function () {
            var val = $(this).data('value');
            $('.shade-box').show();
            $('.answer-correct-box').css('marginTop',10+'px');
            wx.onMenuShareAppMessage({
                title: '你的好友向你发起了智商挑战',
                desc: '应不应战，奖金就在那里~',
                link:  js_config.host+"/pages/index.html",
                imgUrl: js_config.host+'/images/shade_logo.png',
                trigger: function (res) {
                    // 不要尝试在trigger中使用ajax异步请求修改本次分享的内容，因为客户端分享操作是一个同步操作，这时候使用ajax的回包会还没有返回
                   // alert('用户点击发送给朋友');
                },
                success: function (res) {
                    window.location.href = 'index.html';
                },
                cancel: function (res) {
                },
                fail: function (res) {
//                    alert(JSON.stringify(res));
                }
            });
            wx.onMenuShareTimeline({
                title: '你的好友向你发起了智商挑战',
                desc: '应不应战，奖金就在那里~',
                link:  js_config.host+"/pages/index.html",
                imgUrl: js_config.host+'/images/shade_logo.png',
                trigger: function (res) {
                    // 不要尝试在trigger中使用ajax异步请求修改本次分享的内容，因为客户端分享操作是一个同步操作，这时候使用ajax的回包会还没有返回
                    // alert('用户点击发送给朋友');
                },
                success: function (res) {
                    window.location.href = 'index.html';
                },
                cancel: function (res) {
                },
                fail: function (res) {
//                    alert(JSON.stringify(res));
                }
            });
        };

    }

</script>
</body>
</html>
